<script>
    function abc() {
        var name = document.getElementById('search_key');
        name.className = "ipt12";
    }
    function edf() {
        var name = document.getElementById('pl_key');
        name.className = "ipt33";
    }
    function cc(x) {
        var name = document.getElementById("con_five_" + x);
        var list = document.getElementById("five" + x);
        name.style.display = "none";
        list.className = "";
    }
    function setTab(name, cursel, n) {
        for (i = 1; i <= n; i++) {
            var menu = document.getElementById(name + i);
            var con = document.getElementById("con_" + name + "_" + i);
            menu.className = i == cursel ? "hover" : "";
            con.style.display = i == cursel ? "block" : "none";
        }
    }

</script>

<?php //403页面 ?>
<div class="main">
    <div class="left">
        <?php          //$sf_request->getParameter('catalogId')
        @include_component("system", "menuNavigator", array("catalogId" => $catalogId, "subCatalogId" => 3, "type" => 3, "cssStr" => "address_tit address_tit301"));
        echo "<div class=\"baike_top\">";
        $companyId = "1000";
        $celebrityId = "1001";
        $keyword = "";
        function showsex($souse, $type)
        {
            if (1 == $type) {
                switch ($souse) {
                    case "male":
                        return "男";
                        break;
                    case "female":
                        return "女";
                        break;
                    case "mixed":
                        return "组合";
                        break;
                }
            } else
            {
                switch ($souse) {
                    case "actor":
                        return "演员";
                        break;
                    case "singer":
                        return "歌手";
                        break;
                    case "group":
                        return "组合";
                        break;
                    default:
                        return "暂无";
                        break;
                }
            }
        }
        //foreach($celebritys as $celebrity)
        {
            echo "<table><tr><td><img src='" . $celebrity->getSnapshot_big() . "' /></td><td><table cellpadding='5' cellspacing='0'>";

            switch ($celebrity->getCType())
            {
                case '1': //单人
                    echo "<tr><td width='40%' align='right'>姓名：</td><td>" . $celebrity->getName() . "&nbsp;</td></tr>";

                    if (utility::isNotNullOrEmpty($celebrity->getStageName()))
                        echo  "<tr><td align='right'>昵称：</td><td>" . $celebrity->getStageName() . "&nbsp;</td></tr>";
                    if ($celebrity->getSex() != null)
                        echo  "<tr><td align='right'>性别：</td><td>" . showsex(trim($celebrity->getSex()), 1) . "&nbsp;</td></tr>";

                    if (utility::isNotNullOrEmpty($celebrity->getBirthday()))
                        echo  "<tr><td align='right'>生日：</td><td>" . $celebrity->getBirthday() . "&nbsp;</td></tr>";

                    if (utility::isNotNullOrEmpty($celebrity->getHoroscope()))
                        echo  "<tr><td align='right'>星座：</td><td>" . $celebrity->getHoroscope() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getHeight()))
                        echo  "<tr><td align='right'>身高：</td><td>" . $celebrity->getHeight() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getWeight()))
                        echo  "<tr><td align='right'>体重：</td><td>" . $celebrity->getWeight() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getBloodType()))
                        echo  "<tr><td align='right'>血型：</td><td>" . $celebrity->getBloodType() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getCountry()))
                        echo  "<tr><td align='right'>国籍：</td><td>" . $celebrity->getCountry() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getCompanyName()))
                        echo  "<tr><td align='right'>所属公司：</td><td>" . $celebrity->getCompanyName() . "&nbsp;</td></tr>";

                    if (utility::isNotNullOrEmpty($celebrity->getBandName()))
                        echo "<tr><td align='right'>所属组合：</td><td>" . utility::renderCelebrityLinkIfExist($celebrity->getBandName()) . "&nbsp;</td></tr>";


                    if (utility::isNotNullOrEmpty($celebrity->getSchool()))
                        echo  "<tr><td align='right'>毕业学校：</td><td>" . $celebrity->getSchool() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getWorkDate()))
                        echo  "<tr><td align='right'>出道日期：</td><td>" . $celebrity->getWorkDate() . "&nbsp;</td></tr>";

                    if (utility::isNotNullOrEmpty($celebrity->getCareer()))
                        echo  "<tr><td align='right'>身份：</td><td>" . showsex(trim($celebrity->getCareer()), 2) . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getLocation()))
                        echo  "<tr><td align='right'>居住地：</td><td>" . $celebrity->getLocation() . "&nbsp;</td></tr>";
                    if (utility::isNotNullOrEmpty($celebrity->getFansName()))
                        echo "<tr><td align='right'>官方歌迷名称：</td><td>" . $celebrity->getFansName() . "&nbsp;</td></tr>";
                    break;
                case '2': //组合
                    echo "<tr><td width='40%' align='right'>组合名：</td><td>" . $celebrity->getName() . "&nbsp;</td></tr>";
                    if ($celebrity->getBandMember() != null) {
                        mb_regex_encoding('UTF-8');
                        $bandMembers = mb_split('[,，]', $celebrity->getBandMember(), -1);
                        echo "<tr><td width='40%' align='right'>组合成员：</td><td>";
                        foreach ($bandMembers as $member)
                            echo  utility::renderCelebrityLinkIfExist($member) . " ";
                        echo "&nbsp;</td></tr>";
                    }
                    if ($celebrity->getWorkDate() != null)
                        echo "<tr><td align='right'>出道日期：</td><td>" . $celebrity->getWorkDate() . "&nbsp;</td></tr>";
                    if ($celebrity->getCompanyName() != null)
                        echo  "<tr><td align='right'>所属公司：</td><td>" . $celebrity->getCompanyName() . "&nbsp;</td></tr>";
                    if ($celebrity->getBandColor() != null)
                        echo "<tr><td align='right'>代表色：</td><td>" . $celebrity->getBandColor() . "&nbsp;</td></tr>";
                    if ($celebrity->getBandSlogan() != null)
                        echo "<tr><td align='right'>应援口号：</td><td>" . $celebrity->getBandSlogan() . "&nbsp;</td></tr>";
                    if ($celebrity->getMascot() != null)
                        echo "<tr><td align='right'>应援物：</td><td>" . $celebrity->getBandColor() . "&nbsp;</td></tr>";
                    if ($celebrity->getFansName() != null)
                        echo "<tr><td align='right'>官方歌迷名称：</td><td>" . $celebrity->getFansName() . "&nbsp;</td></tr>";
                    break;
            }

            //            echo "<tr><td width='30%' align='right'>姓名：</td><td>" . $celebrity->getName() . "&nbsp;</td></tr>";
            //
            //
            //            if ($celebrity->getWorkDate() != null)
            //                echo "<tr><td align='right'>出道时间：</td><td>" . $celebrity->getWorkDate() . "&nbsp;</td></tr>";
            //
            //
            //            if ($celebrity->getBirthday() != null)
            //                echo  "<tr><td align='right'>出生日期：</td><td>" . $celebrity->getBirthday() . "&nbsp;</td></tr>";

            echo   "</table></td></tr>";
            echo  "<tr><td colspan='2'><br><h3>明星介绍：</h3><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size=2 style='letter-spacing: 1mm;line-height:4mm' color='#757575'>" . $celebrity->getBrief() . "</font></td></tr>";
            echo  "</table>";
            //getSource
            $companyId = $celebrity->getCompany_id();
            $celebrityId = $celebrity->getCelebrity_id();
            $keyword = $celebrity->getTag();

            //break;
        }
        ?>
    </div>

    <?php include_component('celebrity', 'relatePics', array('celebrityId' => $celebrityId)) ?>
    <?php include_component('celebrity', 'relateVideos', array('celebrityId' => $celebrityId)) ?>
    <!--    <div class="MV_videos">-->
    <!--        <h2>-->
    <!--            <div class="com_tit">现场精选<span>MORE LIVE</span></div>-->
    <!--        </h2>-->
    <!--                   --><?php
//                                            @include_component('video', 'relatedlive', array('recordCount' => '3', 'keyword' => $keyword, 'videoType' => '1010'));//现场精选   ,'keyword'=>''
//        ?>
    <!--    </div>-->
    <!--现场精选结束-->
                              <?php
                                  include_component('celebrity', 'relateNews', array('celebrityId' => $celebrityId));
    ?>
</div>
<!--左侧结束 右侧开始-->
<div class="right">
                              <?php
                                                                     @include_component('other', 'advertise');//广告
                                  @include_component('news', 'latest', array("recordCount" => 3));//最新快报,"catalogId"=>1000
                                  @include_component('celebrity', 'samecompany', array('recordCount' => '6', 'companyId' => $companyId, 'celebrityId' => $celebrityId));//同属公司
                                  @include_component('celebrity', 'prefer', array('celebrityId' => $celebrityId));//你会喜欢
                                  @include_component('celebrity', 'officialsite', array('celebrityId' => $celebrityId));//官方网站
                                  ?>
</div>
</div>

